#!/bin/bash

all: 3rdparty_build task_build

3rdparty_build:
	$(info "----------------- 3rdparty_build -----------------")
	${MAKE} behavior_tree_cpp -C 3rdparty/BehaviorTree.CPP || exit 1; \
	${MAKE} install -C 3rdparty/BehaviorTree.CPP || exit 1;

task_build:
	test -d build || mkdir -p build
	cd build && cmake .. && make

clean:
	$(info "----------------- 3rdparty_build clean -----------------")
	${MAKE} clean -C 3rdparty/BehaviorTree.CPP || exit 1;

	$(info "----------------- clean -----------------")
	rm -rf build

.PHONY: all 3rdparty_build
